﻿#pragma once
#include <string>

class SeatOccupy {
private:
    std::string date; // 乘车日期 yyyy-MM-dd
    int train_id;
    int seat_id;
    std::string seat_no;
    int start_station_id;
    int end_station_id;
    int order_id; // 可选，便于追溯
public:
    SeatOccupy() = default;
    SeatOccupy(const std::string& date, int train_id, int seat_id, const std::string& seat_no, int start_station_id, int end_station_id, int order_id)
        : date(date), train_id(train_id), seat_id(seat_id), seat_no(seat_no), start_station_id(start_station_id), end_station_id(end_station_id), order_id(order_id) {}
    // Getters
    std::string getDate() const { return date; }
    int getTrainId() const { return train_id; }
    int getSeatId() const { return seat_id; }
    std::string getSeatNo() const { return seat_no; }
    int getStartStationId() const { return start_station_id; }
    int getEndStationId() const { return end_station_id; }
    int getOrderId() const { return order_id; }
    // Setters
    void setDate(const std::string& d) { date = d; }
    void setTrainId(int t) { train_id = t; }
    void setSeatId(int s) { seat_id = s; }
    void setSeatNo(const std::string& n) { seat_no = n; }
    void setStartStationId(int s) { start_station_id = s; }
    void setEndStationId(int e) { end_station_id = e; }
    void setOrderId(int o) { order_id = o; }
};
